package com.liuhengjia.springbootregister;

import cn.itcast.pojo.Country;
import com.liuhengjia.anno.EnableCommonConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
//@Import(CommonConfig.class)
//@Import(CommonImportSelector.class)
@EnableCommonConfig
public class SpringbootRegisterApplication {

    public static void main(String[] args) {
        ApplicationContext applicationContext = SpringApplication.run(SpringbootRegisterApplication.class, args);
        Country country = applicationContext.getBean(Country.class);
        System.out.println("country = " + country);
//        System.out.println("applicationContext.getBean(\"getProvince\") = " + applicationContext.getBean("getProvince"));
        System.out.println("applicationContext.getBean(\"province\") = " + applicationContext.getBean("province"));
    }

}
